import { ReactNode } from 'react'
import { Button, ButtonProps } from 'antd'
import { ArrowLeftOutlined } from '@ant-design/icons'

interface IBlack extends ButtonProps {
  onClick: () => void
  icon?: ReactNode
}

export const Black = ({ onClick, icon = <ArrowLeftOutlined />, ...rest }: IBlack) => {
  return (
    <Button type="text" icon={icon} onClick={onClick} style={{ marginRight: 12 }} {...rest}>
      返回
    </Button>
  )
}
